import pygame, sys, math, random

pygame.init()

clock = pygame.time.Clock()

width = 800
height = 600
size = width, height

screen = pygame.display.set_mode(size)

bgImage = pygame.image.load("Resources/startscreen/startbg.png")
bgRect = bgImage.get_rect()

bgColor = r,g,b = 0,0,0

start = False
shop = False
credits = False
while True:
    while not start and not shop and not credits:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()
            if event.type == pygame.KEYDOWN:
                if event.key == pygame.K_RETURN:
                    start = True
                if event.key == pygame.K_s:
                    shop = True
                if event.key == pygame.K_c:
                    credits = True

        screen.blit(bgImage, bgRect)
        pygame.display.flip()
        clock.tick(60) 
        
    bgImage = pygame.image.load("Resources/startscreen/main.png")
        
    level = 1

    while start:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()

    while shop:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()       

    while credits:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()
                          
        screen.blit(bgImage, bgRect)
        pygame.display.flip()
        clock.tick(60)






